In [5]:
import tensorflow as tf
with tf.name_scope("Equation_1"):
with tf.name_scope("scope_1"):
with tf.name_scope("A_Square"):
a=tf.square(2,name="a2")
with tf.name_scope("B_square"):
b=tf.square(5,name="b2")
c=tf.add(a,b,name="sum")
with tf.name_scope("scope2"):
p=tf.multiply(2,5,name="mult")
z=tf.scalar_mul(2,p)
res=tf.subtract(c,z,name="final_answer")
with tf.Session() as sess:
writer=tf.summary.FileWriter("/tmp/tboard/output4",sess.graph)
print(sess.run(res))
writer.close()
In [ ]: